﻿<?php ob_start();
if (!isset($_SESSION["taikhoan"]))
	{
		header("Location: dbcl-dangnhap.php");
	}
	include "connect.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Theo Dõi Tình Hình Đánh Giá</title>
<style type="text/css">

a	{
		color: #006600;
		text-decoration: none;
	}

a:hover { COLOR:#FF0000}

.style2 {
	font-size: 18px;
	font-weight: bold;
	color: #FFFFFF;
}
.style3 {font-size: 14px; font-weight: bold; color: #FFFFFF; }
.style4 {
	color: #000099;
	font-weight: bold;
	font-size:20px;
}
.style5 {	color: #FFFFFF;
	font-weight: bold;
	font-size: 30px;
}
.bg {	border-right-color:#0066FF;
		border-bottom-color:#0066FF;
	}

.bg1 {	border-bottom-color:#0066FF;}

.bg2 {	border-top-color:#0066FF;}

.bg3 {	border-left-color:#0066FF;}

.bg4 {	border-right-color:#0066FF;}
.mo	{	color:#0000FF;	}
.style6 {
	
	color: #000099;
}
.style7{
	font-size: 20px;
	font-weight: bold;
}
</style>
<script language="javascript">
	function openUrl(a)
	{
		var win = window.open(a,'Buy ticket',
			'width=' + 1400 + ', height=' + 900 + ', ' +
			'left=' + 0 + ', top=' + 0 + ', ' +
			'location=no, menubar=no, ' +
			'status=no, toolbar=no, scrollbars=yes, resizable=no');
	}
</script>
</head>
<body>
<?php
      
	  $hknk=$_REQUEST["ma"];
	  $tam=mysql_query("select * from `hocki nienkhoa` where ma_hknk='$hknk' ");
	  $t=mysql_fetch_row($tam);
	  $hk=$t[1];$nk=$t[2];
	  $sql = mysql_query("select ten_khoa from `khoa` where ma_khoa='$makhoa'") ;		
		while($rows = mysql_fetch_array($sql))
		{
			$tenkhoa=$rows[0];
			
	    }
?>
<!-- đầu trang --> 	
<?php
		            $kq=mysql_query("select extract(day from curdate()),extract(month from curdate()),extract(year from curdate()) "); 
					while ($r=mysql_fetch_row($kq))
					{
						$ngay=$r[0];
						$thang=$r[1];
						$nam=$r[2];
					}
		  ?>  
<?php // convert image to dataURL
$img_source = "image/logo.gif"; // image path/name
$img_binary = fread(fopen($img_source, "r"), filesize($img_source));
$img_string = "data:image/gif;base64,".base64_encode($img_binary);
?>

	<div align="right">
	<a href="#" onclick="openUrl('exportPDF.php<?php echo "?type=dbcltheodoi&ma=".$_REQUEST["ma"]."&act=in"; ?>');"/>Mẫu In  <?php echo $ngay; ?>/<?php echo $thang; ?>/<?php echo $nam; ?></a></div>
<!--<div align="right"><a href="gv-inketquaword.php?<?php// echo "ma=$ma_hp&hk=$hknk&nhom=$stt"; ?>">In</a></div>-->
	<tr> <td width="900">
   	  <table width="100%" border="0">
          
          <tr>
		    <td  rowspan="2" width="100" style="border:none"><img src="<?php echo $img_string; ?>" height="70" width="100" /></td>
            <td colspan="2" style="border:none"><div align="left" style="font-size:18px; font-weight:bold" class="style6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TRƯỜNG ĐẠI HỌC CẦN THƠ</div></td>
            <td colspan="3" style="border:none"><div align="center" style="font-size:18px; font-weight:bold;" class="style6">CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM</div></td>
          </tr>
          
          <tr>
            <td colspan="2" style="border:none"><div align="left" style="font-size:20px; font-weight:bold;" class="style6">TRUNG TÂM ĐẢM BẢO CHẤT LƯỢNG </div></td>
            <td colspan="3" style="border:none"><div align="center" style="font-size:20px; font-weight:bold" class="style6" >Độc lập - Tự do - Hạnh phúc </div></td>
          </tr>
          
          <tr>
            <td width="100" style="border:none">&nbsp;</td>
			<td width="294" style="border:none" >&nbsp;</td>
			<td width="131" style="border:none" >&nbsp;</td>
            <td width="215" style="border:none">&nbsp;</td>
            <td width="108" class="bg2" style="border:none">&nbsp;</td>
            <td width="218" style="border:none">&nbsp;</td>
          </tr>
                    

          <tr>
            <td height="40" colspan="6"  style="font-size:25px; font-weight:bold; border:none;" class="style6" align="center" valign="bottom">
			     DANH SÁCH SINH VIÊN KHÔNG THAM GIA ĐÁNH GIÁ HỌC PHẦN
            </td>
          </tr>
		  
		  <tr>
            <td height="50" colspan="6"  style="font-size:22px; font-weight:bold; border:none" class="style6" align="center" valign="top">
			     Học Kì <?php echo $hk; ?> (<?php echo $nk; ?>)
            </td>
          </tr>
          <?php
		         $k=mysql_query("select * from `khoa`");
		         while($k1=mysql_fetch_row($k))
				 {
				 $makhoa=$k1[0];
				 $tenkhoa=$k1[1];
				?>
				<tr>
							 <td height="20" colspan="6" style="font-size:25px; font-weight:bold; color:#000099; border:none">&nbsp;* Khoa:  <?php echo $tenkhoa; ?> 
							 </td>
	                     </tr>
						 
				<tr>
							 <td height="20" colspan="6" >&nbsp
							 </td>
	                     </tr>
				<?php
		         $s=mysql_query("select ma_lop from `bo mon` a,`lop sinh vien` b where a.ma_bm=b.ma_bm and a.ma_khoa='$makhoa'");
				 while($t=mysql_fetch_row($s))
				 {
				        $malop=$t[0]; 
						$sql1=mysql_query(" select a.ma_sv,ten_sv,email_sv,ten_hp  from (select ma_sv,ma_hp from  hoc where not exists  (select ma_sv,ma_hp from `danh gia` where ma_hknk='$hknk' and `hoc`.ma_sv=`danh gia`.ma_sv and `hoc`.ma_hp=`danh gia`.ma_hp) and ma_hknk='$hknk') a,`lop sinh vien` b,`sinh vien` c,`hoc phan` d where c.ma_sv=a.ma_sv and c.ma_lop=b.ma_lop and b.ma_lop='$malop' and a.ma_hp=d.ma_hp  ");
						$tam=mysql_num_rows($sql1);
						if($tam>0)
						{
		   ?>
		                  
						 <tr valign="top">
							<td height="20" colspan="6" style="font-size:20px; font-weight:bold; color:#000099; border:none">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Lớp: <?php echo $malop; ?>: </td>
						
						</tr>
		  
						 <tr valign="top">
							<td height="15" colspan="6" style="border:none"> </td>
							
						</tr>
		
						 <tr valign="top">
							<td height="30" colspan="6">
											<table width="850" align="center" cellspacing="0" border="1" bordercolor="#0066FF" cellpadding="0">
																	
													<tr align="center" bgcolor="#CCCCCC">
														<td width="50" height="40" class="bg"><span class="style7">STT</span>				</td>
														<td width="80" class="bg">
																  <span class="style7">MSSV</span>				</td>
														<td width="280" class="bg">
																  <span class="style7">Họ Tên Sinh Viên</span>				</td>
														<td width="220" class="bg">
																  <span class="style7">Email</span>				</td>
														<td width="220" class="bg">
																  <span class="style7">Học Phần </span>				</td>
														
													</tr>
										
												   <?php
												                $dem=0;
																$sql=mysql_query(" select a.ma_sv,ten_sv,email_sv,ten_hp  from (select ma_sv,ma_hp from  hoc where not exists  (select ma_sv,ma_hp from `danh gia` where ma_hknk='$hknk' and `hoc`.ma_sv=`danh gia`.ma_sv and `hoc`.ma_hp=`danh gia`.ma_hp) and ma_hknk='$hknk') a,`lop sinh vien` b,`sinh vien` c,`hoc phan` d where c.ma_sv=a.ma_sv and c.ma_lop=b.ma_lop and b.ma_lop='$malop' and a.ma_hp=d.ma_hp  ");
																
																while($row=mysql_fetch_row($sql))
																{
																   $dem++;
																   $mssv=$row[0];
																   $tensv=$row[1];
																   $email=$row[2];
																   $tenhp=$row[3];
																   ?>
																   <tr>
																	   <td class="bg" height="50" style="font-size:20px;" align="center">
																			 <?php echo "$dem"; ?> 
																	   </td>
															
																	   <td class="bg" align="center" style="font-size:20px;">
																			<?php 
																				  echo "$mssv";
																				  
																			?>
																	   </td>
																	   <td class="bg" align="center" style="font-size:20px;">
																			<?php
																				   
																				  echo "$tensv";
																			?>
																	   </td>
																	   <td class="bg" align="center" style="font-size:20px;">
																			 <?php
																				  
																				   echo "$email";
																			 ?>
																	   </td>
																	    <td class="bg" align="center" style="font-size:20px;">
																			 <?php
																				  
																				   echo "$tenhp";
																			 ?>
																	   </td>
																		 
																   </tr>
												              <?php } ?>
												   
												  </table>
							         </td>
						   
						</tr>
						<tr valign="top">
							<td height="20" colspan="6" style="border:none"> </td>
							
						</tr>
			<?php }//ngoac if
			      }//ngoac while 
			?>
			<tr><td height="30">&nbsp;</td></tr>
			<?php
				  }//ngoac while
				  ?>
      </table>
    </td> 
	</tr>

</body>
</html>


